package tw.rescue.dao;

import java.util.Date;
import java.util.List;

import tw.rescue.model.slim3.model.Activity;

public interface ActivityDao<K> {

	/**
	 * 建立活動
	 * @param activity
	 * @return
	 */
	public Activity createActivity(Activity activity);
	
	/**
	 * 依日期查詢活動主鍵值，最多回傳1000筆
	 * @param from
	 * @param to
	 * @return
	 */
	public List<K>queryActivitiesKeys(Date from, Date to);
	
	/**
	 * 
	 * @param category
	 * @param count
	 * @return
	 */
	public List<Activity>queryActivities(String result);
	
	/**
	 * 讀取 keys 所代表的活動
	 * @param keys
	 * @return
	 */
	public List<Activity>fetchActivities(Iterable<K> keys);
	
	/**
	 * 讀取主鍵值所對應的活動
	 * @param key
	 * @return
	 */
	public Activity getActivity(K key);

	/**
	 * 刪除活動
	 * @param key
	 */
	public void deleteActivity(K key);
	
	/**
	 * 刪除活動
	 * @param key
	 */
	public void deleteActivities(Iterable<K> key);
}
